package cn.wsalix.type;

/**
 * @author jskyme
 * 消费主体
 */
public enum WasteBodyEnum {
	company("company", "商户"), customer("customer", "客户");
	private String code;
	private String title;

	WasteBodyEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static WasteBodyEnum findByCode(String code) {
		for (WasteBodyEnum obj : WasteBodyEnum.values()) {
			if (obj.getCode().equals(code)) {
				return obj;
			}
		}
		return null;
	}
}
